<?php
/*
 * Created on May 14, 2009
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */
 
?>
<?php  $this->load->view('admin/tab/link_bar');?>

<form action="<?php echo $this->base_url?>admin/user/save" method="post">
	<div class="box_function">
		<table width="747" border="0" cellpadding="0" cellspacing="0" class="listproduct" id="listproduct">
	<tr>
		<td colspan="2" style="padding:5px">
<h1>
<?php echo $legend_text?>
</h1>
<?php echo $error_message?>

		</td>
	 </tr>
	<tr>
		<td style="padding:5px"><?php echo $this->lang->line('firstname')?></td>
		<td>
		<input type="text" style="width: 260px; height:20px" class="text" name="txtFirstname" id="txtFirstname" value="<?php echo set_value('txtFirstname',$firstname)?>" maxlength="100" />
		</td>
	</tr>
	<tr>
		<td style="padding:5px"><?php echo lang('lastname')?></td>
		<td>
		<input type="text" style="width: 260px; height:20px" class="text" name="txtLastname" id="txtLastname" value="<?php echo set_value('txtLastname',$lastname)?>" maxlength="100" />
		</td>
	</tr>
	<tr>
		<td style="padding:5px"><?php echo lang('email')?></td>
		<td>
		<input type="text" style="width: 260px; height:20px" class="text" name="txtEmail" id="txtEmail" value="<?php echo set_value('txtEmail',$email)?>" maxlength="100" />
		</td>
	</tr>
	
	<tr>
		<td style="padding:5px"><?php echo lang('password')?></td>
		<td>
		<input type="text" style="width: 260px; height:20px" class="text" name="txtPassword" id="txtPassword" value="" maxlength="100" />
		</td>
	</tr>
	
	<?php
		if($id!= 1 AND $id!=2){
	?>
	<tr>
		<td style="padding:5px"><?php echo lang('active')?></td>
		<td>
		<?php 
		//$data = array('name' => 'active', 'id' => 'active', 'value' => $active, 'checked' => $active==1? true:false);
		//$checked = $active==1? true:false;
		echo form_checkbox(array('name' => 'active', 'id' => 'active', 'value' => 1, 'checked' => ($active==1? true:false)));?>
		</td>
	</tr>
	<tr>
		<td style="padding:5px"><?php echo lang('profile')?></td>
		<td>
		<?php
		echo form_dropdown('id_profile', $profile, $id_profile, ' id="id_profile"');
		?>
		</td>
	</tr>
	<?php
		}
		else{
	?>
	<tr>
		<td></td>
		<td> 
		<input type="hidden" value="1" name="active" id="active">
		<input type="hidden" value="<?php echo $id_profile?>" name="id_profile" id="id_profile">
		</td>
	</tr>
	<?php }?>
	<tr>
		<td></td>
		<td> 
		<?php echo lang('indicates_a_required_field');?>
 		</td>
	</tr>
	
	<tr>
		<td></td>
		<td> 
		<p> <input type="submit" class="submit button" name="btSave" value="<?php echo lang('save')?>" /> </p>
 		</td>
	</tr>
	
</table>
</div>
<input type="hidden" name="txtID" id="txtID" value="<?php echo $id?>"/>

</form>
</fieldset>